﻿<?php
class newsrelationModel extends relationModel{
		public $table = "news";
		public $join  = array(
			"news_data"=>array(//与信息表关联 类型为一对一
				"type"=>"has_one",
				"foreign_key"=>"nid"//关联字段
			),
			"upload"=>array(
				'type' =>"has_many",
				 "foreign_key"=>"id",
				 "other"=>1
			 )
		);

}



?>